import React, { Component } from 'react'
import { connect } from 'react-redux'
import action from '../../store/action/counter.js'

class Home extends Component {
    render() {
        return (
            <div>
                <div>{this.props.num} jin hua</div>
                <button onClick={this.props.increment}>加</button>
            </div>)
    }
}
// 将主键仓库合并
Home = connect(
    state => state.counters,
    action // 会成为当前组件的属性对象
)(Home)

export default Home;
